
def enumeration(*attrs):
    nums = len(attrs)
    ret_list = [None for it in attrs]
    def dfs(now_pos):
        if now_pos == nums:
            yield tuple(ret_list)
        else:
            for it in attrs[now_pos]:
                ret_list[now_pos] = it
                yield from dfs(now_pos + 1)
    
    yield from dfs(0)

